package com.yx.robot.bean.robot;

import java.util.ArrayList;
import java.util.List;

public class AreaInfo implements Cloneable{
    public static final int TYPE_CLEAN = 0;
    public static final int TYPE_FORBIDDEN = 1;
    public static final int TYPE_FORBIDDEN_LINE = 3;
    public static final int TYPE_FORBIDDEN_MOP = 5;
    public static final int TYPE_LOCATION = 4;
    public static final int TYPE_ROOM = 2;

    protected String name;
    protected long id;
    protected int type;
    protected long stamp;
    protected int order;//顺序
    protected List<Double> border;
    public AreaInfo(){
        border=new ArrayList<>();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public long getStamp() {
        return stamp;
    }

    public void setStamp(long stamp) {
        this.stamp = stamp;
    }

    public List<Double> getBorder() {
        return border;
    }

    public void setBorder(List<Double> border) {
        this.border = border;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    @Override
    public AreaInfo clone() {
        AreaInfo areaInfo=null;
        try {
            areaInfo=(AreaInfo) super.clone();
            List<Double> copyBorder=new ArrayList<>();            //深拷贝
            copyBorder.addAll(border);
            areaInfo.setBorder(copyBorder);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return areaInfo;
    }
}
